atomic_t nr_spinning;
};
-/*
- * Use a rwlock to protect the hypercall page from being executed in AP context
- * while the BSP is re-initializing it after restore.
- */
-static DEFINE_RWLOCK(suspend_lock);
-
#ifdef CONFIG_SMP
/*
atomic_inc(&info->nr_spinning);
mb();
- while (info->do_spin) {
+ while (info->do_spin)
cpu_relax();
- read_lock(&suspend_lock);
- HYPERVISOR_yield();
- read_unlock(&suspend_lock);
- }
mb();
atomic_dec(&info->nr_spinning);
suspend_cancelled = HYPERVISOR_suspend(0);
if (!suspend_cancelled) {
- write_lock(&suspend_lock);
platform_pci_resume();
- write_unlock(&suspend_lock);
gnttab_resume();
irq_resume();
}